﻿using System;

namespace BSharp.Compiler
{
	public class IndexerExpression : AstNode
	{
		public readonly AstNode Target;
		public readonly AstNode Index;

		public IndexerExpression (SourceLocation location, AstNode target, AstNode index)
			: base (location)
		{
			Target = target;
			Index = index;
		}

		public override void Visit (AstVisitor visitor)
		{
			visitor.Accept (this);
		}

		public override void VisitChildren (AstVisitor visitor)
		{
			Target.Visit (visitor);
			Index.Visit (visitor);
		}
	}
}

